solved problems on logical instructions